package com.mxx.springaction.proxy.activeProxy;

import java.lang.reflect.InvocationHandler;
import java.lang.reflect.Method;

public class ActiveProxy<T> implements InvocationHandler {

    private T name;

    public ActiveProxy(T name) {
        this.name = name;
    }

    @Override
    public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
        System.out.println(method.getName() + ".....");
        return method.invoke(name, args);
    }
}
